import FilmManagement from '../foot/FilmManagement/FilmManagement.vue'
import SchedulingManagement from '../foot/SchedulingManagement/SchedulingManagement.vue'
import SeatManagement from '../foot/SeatManagement/SeatManagement.vue'
import OrderProcessing from '../foot/OrderProcessing/OrderProcessing.vue'
import Statistics from '../foot/Statistics/Statistics.vue'
import { createRouter, createWebHashHistory } from "vue-router";

const router = createRouter({
    history: createWebHashHistory(),
    routes: [
        { path: '/', redirect: '/FilmManagement', meta: {title:"电影管理"}, name: 'index' },
        { path: '/FilmManagement', component: FilmManagement ,meta: {title:"电影管理"}},
        { path: '/SchedulingManagement', component: SchedulingManagement ,meta: {title:"排片管理"}},
        { path: '/SeatManagement', component: SeatManagement ,meta: {title:"座位管理"}},
        { path: '/OrderProcessing', component: OrderProcessing ,meta: {title:"订单管理"}},
        { path: '/Statistics', component: Statistics,meta: {title:"数据统计"} },

    ]
})
router.beforeEach((to,from,next)=>{
    document.title=to.meta.title
    next()
})
export default router 
